package com.linxz.ui.pojo;

import android.graphics.Rect;
import android.os.Parcel;

import androidx.annotation.Nullable;

import com.previewlibrary.enitity.IThumbViewInfo;

/**
 * @author Linxz
 * 创建日期：2019年10月20日 02:11
 * version：v4.5.4
 * 描述：
 */
public class PreImageBean implements IThumbViewInfo {

    private String path;

    public PreImageBean(String path){
        this.path=path;
    }

    public PreImageBean(Parcel source){
        this.path = source.readString();
    }
    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    @Override
    public String getUrl() {
        return getPath();
    }

    @Override
    public Rect getBounds() {
        return null;
    }

    @Nullable
    @Override
    public String getVideoUrl() {
        return null;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(path);
    }

    public static final Creator<PreImageBean> CREATOR = new Creator<PreImageBean>(){

        @Override
        public PreImageBean createFromParcel(Parcel source) {
            return new PreImageBean(source);
        }

        @Override
        public PreImageBean[] newArray(int size) {
            return new PreImageBean[size];
        }

    };
}
